
#include <iostream>

using namespace std;

template<typename T> T Max( T x, T y ) {
	return x > y ? x : y;
}

template<typename T, typename D> void Func( D x ) {

}

template<typename R, typename T>R Hum(T x){
	R r;
	return r;
}

int main( ) {
	int nx = 10, ny = 20;
//	cout << Max<int>( nx, ny ) << endl;
	cout << Max( nx, ny ) << endl;

	double dx = 1.23, dy = 4.56;
//	cout << Max<double>( dx, dy ) << endl;
	cout << Max( dx, dy ) << endl;

	string sx = "world", sy = "hello";
//	cout << Max<string>( sx, sy ) << endl;
	cout << Max( sx, sy ) << endl;

//	Func( nx );	err
	Func<double>( nx );	// ok

//	Max( nx, dy );	err
	Max( nx, (int)dy );

	Hum<string>( nx );

	return 0;
}
